/*
 *   Copyright 2012, Thomas Kerber
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */
package milk.jpatch.classLevel;

import milk.jpatch.CPoolMap;

import org.apache.bcel.classfile.Field;

/**
 * Patch denoting a Field being removed.
 * @author Thomas Kerber
 * @version 1.0.0
 */
public class FieldRem extends FieldPatch{
    
    private static final long serialVersionUID = 3556885593243244399L;
    
    /**
     * Creates.
     * @param name The field's name.
     */
    protected FieldRem(String name){
        super(name);
    }
    
    /**
     * Generates.
     * @param old The old field.
     * @return The patch.
     */
    public static FieldRem generate(Field old){
        return new FieldRem(old.getName());
    }
    
    @Override
    public Field patch(Field f, CPoolMap map){
        return null; // You shall not pass!
    }
    
}
